package com.cloudsigns.factorymanager2.produce.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.GridView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.cloudsigns.factorymanager2.BaseActivity;
import com.cloudsigns.factorymanager2.R;
import com.cloudsigns.factorymanager2.engineering.customview.ListViewForScrollView;

public class ProduceReturnProcessingActivity extends BaseActivity {
    private RelativeLayout rl_back;
    private TextView tv_title;
    private TextView tv_workpart_name, tv_name, tv_unit, tv_date, tv_return_num, tv_handling, tv_return_reason, tv_receive_team, tv_acceptance_people, tv_acceptance_time;
    private GridView gridView;
    private ListViewForScrollView listView;
    private Button btn_submit;

    @Override
    protected void onBaseCreate(Bundle savedInstanceState) {
        setContentView(R.layout.layout_produce_return_processing);
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        rl_back = findViewById(R.id.rl_back);
        tv_title = findViewById(R.id.tv_title);
        tv_workpart_name = findViewById(R.id.tv_workpart_name);
        tv_name = findViewById(R.id.tv_name);
        tv_unit = findViewById(R.id.tv_unit);
        tv_date = findViewById(R.id.tv_date);
        tv_return_num = findViewById(R.id.tv_return_num);
        tv_handling = findViewById(R.id.tv_handling);
        tv_return_reason = findViewById(R.id.tv_return_reason);
        tv_receive_team = findViewById(R.id.tv_receive_team);
        tv_acceptance_people = findViewById(R.id.tv_acceptance_people);
        tv_acceptance_time = findViewById(R.id.tv_acceptance_time);
        gridView = findViewById(R.id.gridView);
        listView = findViewById(R.id.lv);
        btn_submit = findViewById(R.id.btn_submit);
    }

    @Override
    protected void initData(Bundle savedInstanceState) {
        tv_title.setText(getResources().getString(R.string.return_processing));
    }

    @Override
    public void setListener() {
        rl_back.setOnClickListener(this);
        tv_handling.setOnClickListener(this);
        btn_submit.setOnClickListener(this);
    }

    @Override
    public void widgetClick(View view) {
        switch (view.getId()) {
            case R.id.rl_back:
                finish();
                break;
            // 处理
            case R.id.tv_handling:
                Intent intent = new Intent(ProduceReturnProcessingActivity.this, ProduceWorkpartReturnDealInformationActivity.class);
                startActivity(intent);
                break;
            // 确认处理
            case R.id.btn_submit:
                break;
        }
    }
}
